pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    if threshold < 1 {
        return 0;
    }
    // 生成斐波那契数列并计算范围内奇数的和
    let mut sum = 1;
    let mut prev = 1;
    let mut curr = 1;
    
    // 当前数字小于等于threshold时继续生成
    while curr <= threshold {
        // 如果当前数字在范围内且为奇数
        if curr % 2 == 1 {
            sum += curr;
        }
        
        // 生成下一个斐波那契数
        let next = prev + curr;
        prev = curr;
        curr = next;
    }
    
    sum
}
